package com.example.mapper;

import com.example.domain.Record;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;
@Mapper
public interface RecordMapper {

    @Select("select * from [dbo].[Record]")
    List<Record> showAllRecord();

//    @Insert("insert into [dbo].[Record] (RID,UID,OPTYPE,OPTIME) values " +
//            "(#{rid},#{uid},#{optype},#{optime})")
//    Boolean addNewRecord(Integer rid, Integer uid, String optype, String optime);

    @Insert("insert into [dbo].[Record] (RID,UID,OPTYPE,OPTIME,USERID,RSTATUS) values " +
            "(#{rid},#{uid},#{optype},#{optime},#{userid},#{rstatus})")
    Boolean addNewRecord(Record record);
}
